#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>
#include <QInputDialog>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    int result=QInputDialog::getInt(this,"整数输入对话框","请输入一个整数");
    qDebug()<<result;
}

void MainWindow::on_pushButton_2_clicked()
{
    double result=QInputDialog::getDouble(this,"浮点数输入对话框","请输入一个浮点数");
    qDebug()<<result;
}
